.select2-container {
    display: flex;
    margin-right: 0.5rem;

    .select2-selection {
        box-shadow: $shadow-md;
        background-image: none;
        border-color: $border-color;
        min-height: 38px;
        display: flex;
        align-items: center;
        position: relative;
        transition: all 0.15s ease-in-out;
        outline: 0;

        &:hover {
            border-color: $primary;
        }

        &::after {
            content: '\f078';
            font-family: 'FontAwesome';
            font-size: 0.6rem;
            color: rgba($secondary, 0.5);
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%) rotate(0);
            transition: all 0.15s ease-in-out;
        }

        .select2-selection__arrow {
            display: none;
        }
    }
}

span.selection {
    width: 100%;
}

span.select2-selection__placeholder,
span.select2-container--default,
span.select2-selection--single,
span.select2-selection__rendered {
    color: $text-color;
}
span.select2-selection__rendered {
    width: 100%;
    padding-right: 2.2rem !important;

    .select2-selection__clear {
        font-size: 1.5rem;
        color: rgba($secondary, 0.5);
    }
}

.select2-container--default
.select2-selection--multiple
.select2-selection__clear {
    font-size: 1.5rem;
    color: rgba($secondary, 0.5);
    padding-right: 2.0rem !important;
    margin: 0;
}

.select2-container--open
.select2-selection {
    background-color: $white;
    border-color: $primary;
    box-shadow: 0 0 0 0.2rem rgba($primary, 0.15);
    border-radius: 4px !important;

    &::after {
        transform: translateY(-50%) rotate(-180deg);
    }
}

.select2-dropdown {
    padding: 10px;
    border: 1px solid $border-color !important;
    box-shadow: $shadow-dropdown;
    border-radius: 4px !important;
}

.select2-dropdown--below {
    margin-top: 10px;
    @include dropdown-arrow(top-left);
}

.select2-dropdown--above {
    margin-top: -10px;
    @include dropdown-arrow(bottom-right);
}

.select2-container--default
.select2-search--dropdown
.select2-search__field {
    border: 1px solid $border-color;
    margin-top: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    padding: 8px 12px;
    background: none;
    box-shadow: 0 4px 10px $shadow-color;
    outline: 0;
    transition: all 0.15s ease-in-out;

    &:focus {
        border: 1px solid $primary;
    }
}

.select2-results {
    li {
        padding: 0.55rem 0.45rem;
        border-radius: 4px;
        margin-right: 12px;
        background-color: $white;
    }
}

.select2-container--default
.select2-results__option[aria-selected=true] {
    background-color: $white;
}

.select2-container--default
.select2-results__option--highlighted[aria-selected] {
    background: rgba($primary, 0.08);
    color: $primary;
}

.select2-container--default
.select2-selection--multiple
.select2-selection__choice {
    background-color: $primary;
    color: $white;
    border: none;
    margin-top: 5px;
    margin-bottom: 5px;
    border-radius: 20px;
    padding: 3px 4px;
    padding-right: 11px;
}

.select2-container--default
.select2-selection--multiple
.select2-selection__choice__remove {
    background-color: rgba($secondary, 0.7);
    color: $white;
    border-radius: 20px;
    padding: 0 0.4rem;
    margin-right: 5px;

    &:hover {
        background-color: $white;
    }
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: $primary;
}

@include media-breakpoint-up(md) {
    .select2-container--default .select2-results > .select2-results__options {
        max-height: 400px;
    }
}
